/**
 * 基础路由
 * @type {function(): Promise<{}>}
 */
const Layouts = () => import("@/layouts/index.vue")

const constantRouterMap = [
  {
    path: '/',
    meta:{
      menuName: "工具",
      icon: "Tickets",
    },
    redirect: {name: 'SpiderConfigIndex'},
    component: Layouts,
    children: [
      {
        path: '/spider/config/Index',
        name: 'SpiderConfigIndex',
        meta:{
          menuName: "数据抓取",
          icon: "Collection",
        },
        component: () => import('@/views/spider/config/Index.vue')
      }, {
        path: '/spider/record/Index',
        name: 'SpiderRecordIndex',
        meta:{
          menuName: "操作记录",
          icon: "Files",
        },
        component: () => import('@/views/spider/record/Index.vue')
      }
    ]
  }, {
    path: '/hardware',
    name: 'hardware',
    meta:{
      menuName: "硬件",
      icon: "Files",
    },
    component: Layouts,
    children: [
      {
        path: '/hardware/printer/Index',
        name: 'HardwarePrintfIndex',
        meta:{
          menuName: "打印机",
          icon: "More",
        },
        component: () => import('@/views/hardware/printer/Index.vue')
      }
    ]
  }, {
    path: '/os',
    name: 'os',
    menuName: "系统",
    meta:{
      menuName: "系统",
      icon: "Setting",
    },
    component: Layouts,
    children: [
      {
        path: '/os/screen/Index',
        name: 'OsScreenIndex',
        meta:{
          menuName: "屏幕",
          icon: "House",
        },
        component: () => import('@/views/os/screen/Index.vue')
      }, {
        path: '/os/powermonitor/Index',
        name: 'OsPowermonitorIndex',
        meta:{
          menuName: "电源",
          icon: "View",
        },
        component: () => import('@/views/os/powermonitor/Index.vue')
      }, {
        path: '/os/notification/Index',
        name: 'OsNotificationIndex',
        meta:{
          menuName: "系统通知",
          icon: "Bell",
        },
        component: () => import('@/views/os/notification/Index.vue')
      }
    ]
  }, {
    path: '/framework',
    name: 'framework',
    meta:{
      menuName: "组件",
      icon: "Iphone",
    },
    component: Layouts,
    children: [
      {
        path: '/framework/socket/ipc',
        name: 'FrameworkSocketIpc',
        meta:{
          menuName: "通讯",
          icon: "List",
        },
        component: () => import('@/views/framework/socket/Ipc.vue')
      },
      {
        path: '/framework/socket/httpserver',
        name: 'FrameworkSocketHttpServer',
        meta:{
          menuName: "http通讯",
          icon: "Reading",
        },
        component: () => import('@/views/framework/socket/HttpServer.vue')
      },
      {
        path: '/framework/socket/socketserver',
        name: 'FrameworkSocketSocketServer',
        meta:{
          menuName: "socket通讯",
          icon: "DataLine",
        },
        component: () => import('@/views/framework/socket/SocketServer.vue')
      },
      {
        path: '/framework/jsondb/index',
        name: 'FrameworkJsonDBIndex',
        meta:{
          menuName: "jsonDB",
          icon: "CopyDocument",
        },
        component: () => import('@/views/framework/jsondb/Index.vue')
      },
      {
        path: '/framework/sqlitedb/index',
        name: 'FrameworkSqliteDBIndex',
        meta:{
          menuName: "sqlite",
          icon: "Files",
        },
        component: () => import('@/views/framework/sqlitedb/Index.vue')
      },
      {
        path: '/framework/jobs/index',
        name: 'FrameworkJobsIndex',
        meta:{
          menuName: "任务管理",
          icon: "Stopwatch",
        },
        component: () => import('@/views/framework/jobs/Index.vue')
      },
      {
        path: '/framework/updater/index',
        name: 'FrameworkUpdaterIndex',
        meta:{
          menuName: "更新管理",
          icon: "Dish",
        },
        component: () => import('@/views/framework/updater/Index.vue')
      },
      {
        path: '/framework/software/index',
        name: 'FrameworkSoftwareIndex',
        meta:{
          menuName: "软件管理",
          icon: "Memo",
        },
        component: () => import('@/views/framework/software/Index.vue')
      },
      {
        path: '/framework/java/index',
        name: 'FrameworkJavaIndex',
        meta:{
          menuName: "JAVA服务",
          icon: "CoffeeCup",
        },
        component: () => import('@/views/framework/java/Index.vue')
      },
      {
        path: '/framework/testapi/index',
        name: 'FrameworkTestApiIndex',
        meta:{
          menuName: "接口测试",
          icon: "Sunny",
        },
        component: () => import('@/views/framework/testapi/Index.vue')
      },
    ]
  }
]

export default constantRouterMap
